package ccom.atguigu.bean;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;

import java.util.Date;

/**
 * @author LT
 * @create 2023-11-07-21:15
 */
@Data
@HeadFontStyle(fontName = "宋体")
@HeadStyle(fillBackgroundColor = 2,fillPatternType = FillPatternTypeEnum.LESS_DOTS)
@HeadRowHeight(value = 40)
public class Emp {

    @ExcelProperty(value = "编号" , index = 8)
    private Long id;
    @ExcelProperty(value = "姓名" ,index= -1)
    private String name;
    @ExcelIgnore //不输出当前字段值
    private String idCard;
    @ExcelProperty(value = "性别" , index = 7)
    private String gender;
    @ExcelProperty(value = "薪资" )
    @NumberFormat(value = "#.##") //.## 表示保留小数点后两位
    private Double salary;
    @ExcelProperty(value = "入职日期")
    @DateTimeFormat(value = "yyyy年MM月dd日")
    private Date joinDate;

}
